<style>
    span {
        border-bottom: 2px solid lightgray;
    }
</style>

<div class="continue">
    <span>连续的span</span><span>连续的span</span><span>连续的span</span><span>连续的span</span>
</div>
<div class="nocontinue">
    <span>有换行的span</span>
    <span>有换行的span</span>
    <span>有换行的span</span>
</div>